/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.srcptit.javatrainning.duongnt.b1;

import java.util.Scanner;

/**
 *
 * @author ThuyDuong
 */
public class Bai6Muc1Sothuannghich {
     public static void main(String[] args) {
        int a;
        System.out.println("nhap a");
        Scanner sc = new Scanner(System.in);
        a = sc.nextInt();
        if(thuannghich(a))
            System.out.println(a+" la so thuan nghich");
        else System.out.println(a+" khong la so thuan nghich");
        }

      public static boolean thuannghich(int a) {
        int m=a,dao=0;
        while(m>0)
        {
            dao=dao*10+m%10;
            m=m/10;
        }
        if(dao==a)
            return true;
        return false;
    }

}
